

succs([],[]).
succs([H1|T1],[H2|T2]) :- H2 is 1+H1,succs(T1,T2).

fromsucc(0,0) :- !.
fromsucc(succ(Y),N) :- fromsucc(Y,N1),N is N1+1.

tosucc(0,0) :- !.
tosucc(X,succ(Y)) :- X1 is X-1,tosucc(X1,Y).
